﻿using System.Net;

namespace eLongLoginTest.Globals
{

    public class Globals
    {

            public static CookieContainer cookie; 
            /// <summary>
            /// 字符串进行MD5加密
            /// </summary>
            /// <param name="NotEncryptString"></param>
            /// <returns>进行MD5加密后的字符串</returns>
            public static string MD5(string NotEncryptString)
            {
                string MD5Str;
                try
                {
                    MD5Str = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(NotEncryptString, "MD5");
                }
                catch
                {
                    MD5Str = "";
                    //记录错误信息

                }
                return MD5Str;
            }
     }
   
}
